package com.t.bricks.bussiness.db.entity.astrictbuy.base;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;
import java.util.Date;

import org.springframework.format.annotation.DateTimeFormat;

import com.t.bricks.annotation.DataInfo;

/**
 * 限购'AstrictBuy'表实体类
 * 警告:非数据库字段禁止在此添加,应该创建扩展实体中添加
 * @author HuangXinBian
 */
@ApiModel("限购AstrictBuy")
@DataInfo(sDbName="BricksMall", sTableName="AstrictBuy")
public class AstrictBuyBase implements Serializable {

	private static final long serialVersionUID = 1L;// 使用rmi时需修改

	/**
	 * 记录编号
	 */
	//[start]
	@DataInfo( sDbName="BricksMall", sTableName="AstrictBuy",
		sName="sId", sComment="记录编号", isDbField=true, sDbFileType="varchar",
		sDefaultData="", isExtra=false, iskey=true, isNull=false,
		iMaxLength=65, isDecimal=false, iIntegralLength=2, iDecimalLength=2, iIndex=0 )
	@ApiModelProperty(value="记录编号", example="", position=0)
	//[end]
	protected String sId;

	/**
	 * 商品编号
	 */
	//[start]
	@DataInfo( sDbName="BricksMall", sTableName="AstrictBuy",
		sName="sWaresId", sComment="商品编号", isDbField=true, sDbFileType="varchar",
		sDefaultData="", isExtra=false, iskey=false, isNull=false,
		iMaxLength=32, isDecimal=false, iIntegralLength=2, iDecimalLength=2, iIndex=1 )
	@ApiModelProperty(value="商品编号", example="", position=1)
	//[end]
	protected String sWaresId;

	/**
	 * 顾客编号
	 */
	//[start]
	@DataInfo( sDbName="BricksMall", sTableName="AstrictBuy",
		sName="sCustomerId", sComment="顾客编号", isDbField=true, sDbFileType="varchar",
		sDefaultData="", isExtra=false, iskey=false, isNull=false,
		iMaxLength=32, isDecimal=false, iIntegralLength=2, iDecimalLength=2, iIndex=2 )
	@ApiModelProperty(value="顾客编号", example="", position=2)
	//[end]
	protected String sCustomerId;

	/**
	 * 订单编号
	 */
	//[start]
	@DataInfo( sDbName="BricksMall", sTableName="AstrictBuy",
		sName="sOrderId", sComment="订单编号", isDbField=true, sDbFileType="varchar",
		sDefaultData="", isExtra=false, iskey=false, isNull=false,
		iMaxLength=10, isDecimal=false, iIntegralLength=2, iDecimalLength=2, iIndex=3 )
	@ApiModelProperty(value="订单编号", example="", position=3)
	//[end]
	protected String sOrderId;

	/**
	 * 创建日期
	 */
	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")//解决表单提交时字符串时间值错误
	//[start]
	@DataInfo( sDbName="BricksMall", sTableName="AstrictBuy",
		sName="dCreateDate", sComment="创建日期", isDbField=true, sDbFileType="datetime",
		sDefaultData="", isExtra=false, iskey=false, isNull=false,
		iMaxLength=23, isDecimal=false, iIntegralLength=-1, iDecimalLength=-1, iIndex=4 )
	@ApiModelProperty(value="创建日期", example="", position=4)
	//[end]
	protected Date dCreateDate;

	/**
	 * 取 记录编号
	 * @return String
	 */
	public String getsId() {
		return sId;
	}

	/**
	 * 设置记录编号
	 * @param sId
	 */
	public void setsId(String sId) {
		this.sId = sId;
	}

	/**
	 * 取 商品编号
	 * @return String
	 */
	public String getsWaresId() {
		return sWaresId;
	}

	/**
	 * 设置商品编号
	 * @param sWaresId
	 */
	public void setsWaresId(String sWaresId) {
		this.sWaresId = sWaresId;
	}

	/**
	 * 取 顾客编号
	 * @return String
	 */
	public String getsCustomerId() {
		return sCustomerId;
	}

	/**
	 * 设置顾客编号
	 * @param sCustomerId
	 */
	public void setsCustomerId(String sCustomerId) {
		this.sCustomerId = sCustomerId;
	}

	/**
	 * 取 订单编号
	 * @return String
	 */
	public String getsOrderId() {
		return sOrderId;
	}

	/**
	 * 设置订单编号
	 * @param sOrderId
	 */
	public void setsOrderId(String sOrderId) {
		this.sOrderId = sOrderId;
	}

	/**
	 * 取 创建日期
	 * @return Date
	 */
	public Date getdCreateDate() {
		return dCreateDate;
	}

	/**
	 * 设置创建日期
	 * @param dCreateDate
	 */
	public void setdCreateDate(Date dCreateDate) {
		this.dCreateDate = dCreateDate;
	}

	/**
	 * 复制对象
	 * @param source 数据源
	 * @return AstrictBuyBase
	 */
	public static AstrictBuyBase copy(AstrictBuyBase source) {
		if (null == source) {
			return null;
		}
		
		AstrictBuyBase target = new AstrictBuyBase();
		target.setsId(source.getsId());
		target.setsWaresId(source.getsWaresId());
		target.setsCustomerId(source.getsCustomerId());
		target.setsOrderId(source.getsOrderId());
		target.setdCreateDate(source.getdCreateDate());

		return target;
	}
	
	/**
	 * 克隆对象
	 * @return AstrictBuyBase
	 */
	public AstrictBuyBase clone() {
		return copy(this);
	}
	
}
